<!DOCTYPE html>
<%@ taglib prefix="c" uri="http://java.sun.com/jsp/jstl/core" %>
<%@ taglib prefix="form" uri="http://www.springframework.org/tags/form" %>
<%@ taglib prefix="fn" uri="http://java.sun.com/jsp/jstl/functions" %>
<%--
  Created by IntelliJ IDEA.
  User: 85167
  Date: 2017/12/10
  Time: 11:00
  To change this template use File | Settings | File Templates.
--%>
<%@ page contentType="text/html;charset=UTF-8" language="java" %>
<html>
<head>
    <title>Title</title>
    <c:import url="/WEB-INF/page/header.jsp"/>

</head>
<body>
<div class="col-md-12">
    <form id="inputForm" class="form-horizontal" action="${pageContext.request.contextPath}/admin/biz/devType/save"
          method="post">
        <input type="hidden" name="id" value="${info.id}">
        <table class="table table-bordered  table-condensed dataTables-example dataTable no-footer">
            <tbody>
            <tr>
                <td class="width-15 active"><label class="pull-right"><font color="red">*</font>名称：</label></td>
                <td class="width-35">
                    <input id="sn" name="name" class="form-control required" type="text" value="${info.name}"
                           aria-required="true">
                </td>
            </tr>
            <tr>
                <td class="width-15 active"><label class="pull-right"><font color="red">*</font>押金(分)：</label></td>
                <td class="width-35">
                    <input id="deposit" name="deposit" class="form-control  required number" type="text"
                           value="${info.deposit}">
                </td>
            </tr>
            <tr>
                <td class="width-15 active"><label class="pull-right">选择套餐 ：</label></td>
                <td class="width-35">
                    <c:forEach items="${billSets}" var="vo">
                        <div class="checkbox i-checks" style="display:inline">
                            <c:choose>
                                <c:when test="${fn:contains(info.billSetIdList,vo.id)}">
                                    <label>
                                        <input type="checkbox" name="billSetIds[]" value="${vo.id}" checked>
                                        <i></i>${vo.name}
                                    </label>
                                </c:when>
                                <c:otherwise>
                                    <label>
                                        <input type="checkbox" name="billSetIds[]" value="${vo.id}"> <i></i>${vo.name}
                                    </label>
                                </c:otherwise>
                            </c:choose>
                        </div>
                    </c:forEach>
                </td>
            </tr>
            <tr>
                <td class="width-15 active"><label class="pull-right">选择滤芯 ：</label></td>
                <td class="width-35">
                    <c:forEach items="${filterInfos}" var="vo">
                        <div class="checkbox i-checks" style="display:inline">
                            <c:choose>
                                <c:when test="${fn:contains(info.filterIdList,vo.id)}">
                                    <label>
                                        <input type="checkbox" name="filterIds[]" value="${vo.id}" checked>
                                        <i></i>${vo.name}
                                    </label>
                                </c:when>
                                <c:otherwise>
                                    <label>
                                        <input type="checkbox" name="filterIds[]" value="${vo.id}"> <i></i>${vo.name}
                                    </label>
                                </c:otherwise>
                            </c:choose>
                        </div>
                    </c:forEach>

                </td>

            </tr>
            </tbody>
        </table>
    </form>
</div>
<c:import url="/WEB-INF/page/footer.jsp"/>
<script>
    $(document).ready(function () {
        $('.i-checks').iCheck({
            checkboxClass: 'icheckbox_square-green',
            radioClass: 'iradio_square-green',
        });
    });
</script>
</body>
</html>
